import request from '@/utils/request'
/**
 * 客户中心相关接口
 * @param data
 *
 * @returns
 */
// 客户看板内容查询
export const getBoard = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/list',
    method: 'POST',
    data
  })
}
// 客户看板统计
export const getBoardlist = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/stats',
    method: 'POST',
    data
  })
}
// 客户看板统计转换漏斗
export const getBoardfunnel = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/funnel',
    method: 'POST',
    data
  })
}
// 客户看板统计转换漏斗导出
export const getBoardfunnelexport = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/export-funnel',
    method: 'POST',
    data
  })
}
// 客户看板员工top10
export const getBoardtop = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/top',
    method: 'POST',
    data
  })
}
// 客户看板统计员工top10导出
export const getBoardtopexport = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/export-top',
    method: 'POST',
    data
  })
}
// 客户看板客户阶段走势
export const getBoardtrend= (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/trend',
    method: 'POST',
    data
  })
}
// 客户看板客户阶段列表
export const getBoardstagelist = (data: any) => {
  return request({
    url: '/scrm-api/console/customer/board/stage-list',
    method: 'GET',
    params: data
  })
}
export const getLoaction = (data: any) => {
  return request({
    url: '/scrm-api/console/tecent-map/agency?api=/ws/location/v1/ip',
    method: 'GET',
    params: data,
  })
}

 // 搜索
 export const getGeocoder = (data: any) => {
    return request({
      url: '/scrm-api/console/tecent-map/agency?api=/ws/geocoder/v1',
      method: 'GET',
      params: data
    })
  }
  //搜索关键字
  export const getsuggestion = (data: any) => {
    return request({
      url: '/scrm-api/console/tecent-map/agency?api=/ws/place/v1/suggestion',
      method: 'GET',
      params: data
    })
  }
